package com.zc.manager.notify.domain;

import com.zc.component.notify.core.template.TemplateProperties;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 通知模版对象 notify_template
 *
 * @author wangjiabao
 * @date 2022-11-14
 */
@Getter
@Setter
@ToString
public class NotifyTemplate extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 模版内容(根据服务商不同而不同) */
    @Excel(name = "模版内容")
    private String template;

    /** 通知服务商 */
    @Excel(name = "通知服务商")
    private String provider;

    /** 模板名称 */
    @Excel(name = "模板名称")
    private String name;

    /** 通知类型 */
    @Excel(name = "通知类型")
    private String type;

    public TemplateProperties toTemplateProperties() {
        TemplateProperties properties = new TemplateProperties();
        properties.setProvider(provider);
        properties.setType(type);
        properties.setTemplate(template);
        return properties;
    }

}
